/* OthelloMIDlet.java */

import java.io.IOException;
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.*;

public class OthelloMIDlet extends MIDlet {
	private Display disp;
	private Othello othello;

	public OthelloMIDlet() {
		disp = Display.getDisplay(this);
	}

	protected void startApp() {
		try {
			othello = new Othello(this);
		} catch(IOException ioe) {
			System.err.println("Problem creating Othello: "+ioe);
		}
		disp.setCurrent(othello);
	}

	public Display getDisplay() { return disp; }
	public void pauseApp() { othello.stop(); }
	public void destroyApp(boolean unconditional) { othello.stop(); }
}
